import request from '@/utils/request'

// 左侧工单模板相关接口
export function listWorkOrderTemplate(params) {
  return request({
    url: '/operation/web/operationWorkOrderTemplate/list',
    method: 'get',
    params
  })
}

export function addWorkOrderTemplate(data) {
  return request({
    url: '/operation/web/operationWorkOrderTemplate',
    method: 'post',
    data
  })
}

export function updateWorkOrderTemplate(data) {
  return request({
    url: '/operation/web/operationWorkOrderTemplate',
    method: 'put',
    data
  })
}

export function deleteWorkOrderTemplate(templateIds) {
  return request({
    url: `/operation/web/operationWorkOrderTemplate/${templateIds}`,
    method: 'delete'
  })
}

// 右侧流转环节配置相关接口
export function getOperatorTypeList() {
  return request({
    url: '/operation/web/operationWorkflowStep/operatorTypeList',
    method: 'get'
  })
}

export function listWorkflowStep(params) {
  return request({
    url: '/operation/web/operationWorkflowStep/list',
    method: 'get',
    params
  })
}

export function addWorkflowStep(data) {
  return request({
    url: '/operation/web/operationWorkflowStep',
    method: 'post',
    data
  })
}

export function updateWorkflowStep(data) {
  return request({
    url: '/operation/web/operationWorkflowStep',
    method: 'put',
    data
  })
}

export function deleteWorkflowStep(ids) {
  return request({
    url: `/operation/web/operationWorkflowStep/${ids}`,
    method: 'delete'
  })
}